#!/usr/bin/bash
#
# Put customizations to your image in this file.

PATH=/opt/local/gnu/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin

# Exit if any commands fail
set -o errexit

echo "* Create ssl folder for nginx"
mkdir /opt/local/etc/nginx/ssl

echo "* Create user for minio service"
mkdir -p /data
groupadd minio
useradd -b /data -g minio -s /usr/bin/false minio


echo "* Cleanup home/admin because of delegate dataset usage"
rm -rf /home/admin/.[^.]*

echo "* Cleaning up"
rm -rf /root/*
sm-prepare-image -y
